Skip to content

fix: project admin user can op db#481

Merged
LordofAvernus merged 1 commit into
mainfrom
fix_db_services_tips
Jul 1, 2025
Merged

fix: project admin user can op db#481
LordofAvernus merged 1 commit into
mainfrom
fix_db_services_tips

Conversation

@Jarvis1105
Copy link
Copy Markdown
Contributor

@Jarvis1105 Jarvis1105 commented Jul 1, 2025

User description

link: actiontech/sqle#3074
issue: https://github.com/actiontech/sqle-ee/issues/2387#issuecomment-3021913873

  • 有项目管理员权限可以通过tips接口查看所有的数据源而不是作用范围是project的权限

Description

  • 修改项目管理员权限判断逻辑

  • 替换条件为检查pkgConst.UIDOfOpPermissionProjectAdmin

  • 修正权限验证错误


Changes diagram

flowchart LR
    A["开始权限校验"] --> B["判断是否为项目管理员"]
    B -- "若为项目管理员" --> C["返回true"]
    B -- "否则" --> D["执行其他权限验证"]
Loading

Changes walkthrough 📝

Relevant files
Bug fix
op_permission_verify.go
更新项目管理员权限判断逻辑                                                                                       

internal/dms/biz/op_permission_verify.go

  • 修改权限判断条件
  • 更新注释解释项目管理员权限变更
+2/-2     

Need help?
  • Type /help how to ... in the comments thread for any questions about PR-Agent usage.
  • Check out the documentation for more information.
  • @Jarvis1105 Jarvis1105 requested a review from LordofAvernus July 1, 2025 06:00
    @actiontech-bot actiontech-bot requested review from BugsGuru and removed request for LordofAvernus July 1, 2025 06:00
    @Jarvis1105 Jarvis1105 requested a review from LordofAvernus July 1, 2025 06:01
    @actiontech-bot actiontech-bot requested review from BugsGuru and removed request for BugsGuru and LordofAvernus July 1, 2025 06:01
    @github-actions
    Copy link
    Copy Markdown

    github-actions Bot commented Jul 1, 2025

    PR Reviewer Guide 🔍

    ⏱️ Estimated effort to review: 1 🔵⚪⚪⚪⚪
    🧪 PR contains tests
    🔒 No security concerns identified
    ⚡ Recommended focus areas for review

    权限校验逻辑

    请检查项目管理员权限判断逻辑的改动是否满足系统整体的权限安全要求,以及是否需要在其他地方同步更新相关逻辑。

    // 项目管理员可以查看所有数据源
    if userOpPermission.OpPermissionUID == pkgConst.UIDOfOpPermissionProjectAdmin {

    @github-actions
    Copy link
    Copy Markdown

    github-actions Bot commented Jul 1, 2025

    PR Code Suggestions ✨

    No code suggestions found for the PR.

    @LordofAvernus LordofAvernus merged commit b72a344 into main Jul 1, 2025
    1 check passed
    LordofAvernus added a commit that referenced this pull request Apr 9, 2026
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Labels

    None yet

    Projects

    None yet

    Development

    Successfully merging this pull request may close these issues.

    2 participants